home *** CD-ROM | disk | FTP | other *** search
/ El Mac 1 / Magazine.iso / EL MAC 1 / Shareware / HyperCard / XCMD Docs / CompileIt! Source Code / PrintPict PicName < prev    next >
Encoding:
Text File  |  1995-08-19  |  765 b   |  35 lines  |  [TEXT/ttxt]

  1. global g:R,myStRec:R
  2. on PrintPict PicName
  3.   PrOpen
  4.   put NewHandle(1024) into hhh
  5.   PrintDefault hhh
  6.   SysBeep 20
  7.   put PrStlDialog(hhh) into t1
  8.   if t1=0 then
  9.     disposeptr hhh
  10.     PrClose
  11.     exit PrintPict
  12.     -- user canceled
  13.   end if
  14.   put PrJobDialog(hhh) into t2
  15.   if t2=0 then
  16.     disposeptr hhh
  17.     PrClose
  18.     exit PrintPict
  19.     -- user canceled
  20.   end if
  21.   put PrOpenDoc(hhh,NIL,NIL) into PrGrafPort
  22.   prOpenPage PrGrafPort,NIL
  23.   get GetNamedResource("PICT",picName)
  24.   if it≠NIL then
  25.     put it@@.picFrame.topLeft into g.topLeft
  26.     put it@@.picFrame.botRight into g.botRight
  27.     DrawPicture it,g
  28.     releaseResource it
  29.   end if
  30.   prClosePage PrGrafPort
  31.   PrCloseDoc PrGrafPort
  32.   PrPicFile hhh,NIL,NIL,NIL,myStRec
  33.   PrClose
  34.   disposePtr hhh
  35. end PrintPict